<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateDeliverableItemTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('deliverable_item', function(Blueprint $table)
		{
			$table->increments('id');
			$table->string('name')->index('deliverable_item_name');
			$table->integer('status')->index('deliverable_item_status');
			$table->dateTime('start_date')->nullable();
			$table->dateTime('end_date')->nullable();
			$table->integer('project');
			$table->integer('phase')->index('deliverable_item_phase');
			$table->text('desc', 65535)->nullable();
			$table->boolean('valid')->default(1);
			$table->timestamps();
			$table->softDeletes();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('deliverable_item');
	}

}
